<template>
  <div class="star">
    <myheader title="我的收藏">
      <span slot="left" class="iconfont iconjiantou2" @click="$router.back()">
      </span>
    </myheader>
    <articleblock v-for="(v, i) in starList" :key="i" :post="v"> </articleblock>
  </div>
</template>

<script>
import myheader from "@/components/myheader";
import axios from "@/utils/myaxios.js";
import { user_starList } from "@/api/user";
import articleblock from "@/components/articleblock";
export default {
  data() {
    return {
      starList: [],
    };
  },
  components: {
    myheader,
    articleblock,
  },
  async mounted() {
    //   获取用户收藏列表
    let res = await user_starList();
    this.starList = res.data.data.map((v) => {
      v.user.head_img = axios.defaults.baseURL + v.user.head_img;
      return v;
    });
    console.log(this.starList);
  },
};
</script>

<style>
</style>